cmake_minimum_required(VERSION 2.6)
project(HELLO)
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -D_DEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O0 -DNDEBUG")
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREAD OFF)
set(Boost_DEBUG TRUE)
find_package(Boost REQUIRED iostreams)
if (Boost_NOTFOUND)
	message(FATAL_ERROR "Boost not found")
endif()

IF (NOT ZLIB_DIR)
	IF ($ENV{ZLIB_DIR} MATCHES ".+")
		FILE(TO_CMAKE_PATH $ENV{ZLIB_DIR} ZLIB_DIR)
		MESSAGE(STATUS "ZLIB_DIR from environment: ${ZLIB_DIR}")
	ENDIF()
ENDIF()
SET(CMAKE_INCLUDE_PATH ${ZLIB_DIR}/include ${CMAKE_INCLUDE_PATH})
SET(CMAKE_LIBRARY_PATH ${ZLIB_DIR}/dll ${ZLIB_DIR}/lib ${CMAKE_LIBRARY_PATH})
find_package(zlib REQUIRED)
IF (ZLIB_FOUND)
  MESSAGE(STATUS "Cmake FindZLIB: using ZLIB includes at: ${ZLIB_INCLUDE_DIR}")
  MESSAGE(STATUS "Cmake FindZLIB: using ZLIB libraries: ${ZLIB_LIBRARIES}")
ENDIF()

include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
message(STATUS ${Boost_LIBRARY_DIRS}) 
message(STATUS ${Boost_LIBRARIES}) 
set(HELLO_SRCS main.cpp)
add_executable(hello ${HELLO_SRCS})
target_link_libraries(hello ${Boost_LIBRARIES} ${ZLIB_LIBRARIES})

